3.13 \(\int (a+b \log (c x^n))^2 \log (1+e x) \, dx\)

Optimal. Leaf size=193 \[ \frac{2 b n \text{PolyLog}(2,-e x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{2 b^2 n^2 \text{PolyLog}(2,-e x)}{e}-\frac{2 b^2 n^2 \text{PolyLog}(3,-e x)}{e}-\frac{2 b n (e x+1) \log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac{(e x+1) \log (e x+1) \left (a+b \log \left (c x^n\right )\right )^2}{e}+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2+2 a b n x+2 b^2 n x \log \left (c x^n\right )+\frac{2 b^2 n^2 (e x+1) \log (e x+1)}{e}-6 b^2 n^2 x \]

[Out]

2*a*b*n*x - 6*b^2*n^2*x + 2*b^2*n*x*Log[c*x^n] + 2*b*n*x*(a + b*Log[c*x^n]) - x*(a + b*Log[c*x^n])^2 + (2*b^2*
n^2*(1 + e*x)*Log[1 + e*x])/e - (2*b*n*(1 + e*x)*(a + b*Log[c*x^n])*Log[1 + e*x])/e + ((1 + e*x)*(a + b*Log[c*
x^n])^2*Log[1 + e*x])/e - (2*b^2*n^2*PolyLog[2, -(e*x)])/e + (2*b*n*(a + b*Log[c*x^n])*PolyLog[2, -(e*x)])/e -
 (2*b^2*n^2*PolyLog[3, -(e*x)])/e

________________________________________________________________________________________

Rubi [A]  time = 0.334975, antiderivative size = 193, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 12, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.632, Rules used = {2389, 2295, 2370, 2346, 2301, 6742, 2411, 43, 2351, 2315, 2374, 6589} \[ \frac{2 b n \text{PolyLog}(2,-e x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{2 b^2 n^2 \text{PolyLog}(2,-e x)}{e}-\frac{2 b^2 n^2 \text{PolyLog}(3,-e x)}{e}-\frac{2 b n (e x+1) \log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac{(e x+1) \log (e x+1) \left (a+b \log \left (c x^n\right )\right )^2}{e}+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2+2 a b n x+2 b^2 n x \log \left (c x^n\right )+\frac{2 b^2 n^2 (e x+1) \log (e x+1)}{e}-6 b^2 n^2 x \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2*Log[1 + e*x],x]

[Out]

2*a*b*n*x - 6*b^2*n^2*x + 2*b^2*n*x*Log[c*x^n] + 2*b*n*x*(a + b*Log[c*x^n]) - x*(a + b*Log[c*x^n])^2 + (2*b^2*
n^2*(1 + e*x)*Log[1 + e*x])/e - (2*b*n*(1 + e*x)*(a + b*Log[c*x^n])*Log[1 + e*x])/e + ((1 + e*x)*(a + b*Log[c*
x^n])^2*Log[1 + e*x])/e - (2*b^2*n^2*PolyLog[2, -(e*x)])/e + (2*b*n*(a + b*Log[c*x^n])*PolyLog[2, -(e*x)])/e -
 (2*b^2*n^2*PolyLog[3, -(e*x)])/e

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2370

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[Log[d*(e + f*x^m)^r], x]}, Dist[(a + b*Log[c*x^n])^p, u, x] - Dist[b*n*p, Int[Dist[(a + b*Log[c*x
^n])^(p - 1)/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && RationalQ[m] && (EqQ[
p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 1] && EqQ[m, 1] && EqQ[d*e, 1]))

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x) \, dx &=-x \left (a+b \log \left (c x^n\right )\right )^2+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-(2 b n) \int \left (-a-b \log \left (c x^n\right )+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e x}\right ) \, dx\\ &=2 a b n x-x \left (a+b \log \left (c x^n\right )\right )^2+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\left (2 b^2 n\right ) \int \log \left (c x^n\right ) \, dx-\frac{(2 b n) \int \frac{(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x} \, dx}{e}\\ &=2 a b n x-2 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )-x \left (a+b \log \left (c x^n\right )\right )^2+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-\frac{(2 b n) \int \left (e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)+\frac{\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}\right ) \, dx}{e}\\ &=2 a b n x-2 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )-x \left (a+b \log \left (c x^n\right )\right )^2+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-(2 b n) \int \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx-\frac{(2 b n) \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x} \, dx}{e}\\ &=2 a b n x-2 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac{2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2(-e x)}{e}+\left (2 b^2 n^2\right ) \int \left (-1+\frac{(1+e x) \log (1+e x)}{e x}\right ) \, dx-\frac{\left (2 b^2 n^2\right ) \int \frac{\text{Li}_2(-e x)}{x} \, dx}{e}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac{2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2(-e x)}{e}-\frac{2 b^2 n^2 \text{Li}_3(-e x)}{e}+\frac{\left (2 b^2 n^2\right ) \int \frac{(1+e x) \log (1+e x)}{x} \, dx}{e}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac{2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2(-e x)}{e}-\frac{2 b^2 n^2 \text{Li}_3(-e x)}{e}+\frac{\left (2 b^2 n^2\right ) \operatorname{Subst}\left (\int \frac{x \log (x)}{-\frac{1}{e}+\frac{x}{e}} \, dx,x,1+e x\right )}{e^2}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac{2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2(-e x)}{e}-\frac{2 b^2 n^2 \text{Li}_3(-e x)}{e}+\frac{\left (2 b^2 n^2\right ) \operatorname{Subst}\left (\int \left (e \log (x)+\frac{e \log (x)}{-1+x}\right ) \, dx,x,1+e x\right )}{e^2}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac{2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2(-e x)}{e}-\frac{2 b^2 n^2 \text{Li}_3(-e x)}{e}+\frac{\left (2 b^2 n^2\right ) \operatorname{Subst}(\int \log (x) \, dx,x,1+e x)}{e}+\frac{\left (2 b^2 n^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{-1+x} \, dx,x,1+e x\right )}{e}\\ &=2 a b n x-6 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2+\frac{2 b^2 n^2 (1+e x) \log (1+e x)}{e}-\frac{2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac{(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-\frac{2 b^2 n^2 \text{Li}_2(-e x)}{e}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2(-e x)}{e}-\frac{2 b^2 n^2 \text{Li}_3(-e x)}{e}\\ \end{align*}

Mathematica [A]  time = 0.0927814, size = 294, normalized size = 1.52 \[ \frac{2 b n \text{PolyLog}(2,-e x) \left (a+b \log \left (c x^n\right )-b n\right )-2 b^2 n^2 \text{PolyLog}(3,-e x)+a^2 (-e) x+a^2 e x \log (e x+1)+a^2 \log (e x+1)-2 a b e x \log \left (c x^n\right )+2 a b \log (e x+1) \log \left (c x^n\right )+2 a b e x \log (e x+1) \log \left (c x^n\right )+4 a b e n x-2 a b n \log (e x+1)-2 a b e n x \log (e x+1)-b^2 e x \log ^2\left (c x^n\right )+b^2 \log (e x+1) \log ^2\left (c x^n\right )+b^2 e x \log (e x+1) \log ^2\left (c x^n\right )+4 b^2 e n x \log \left (c x^n\right )-2 b^2 n \log (e x+1) \log \left (c x^n\right )-2 b^2 e n x \log (e x+1) \log \left (c x^n\right )-6 b^2 e n^2 x+2 b^2 n^2 \log (e x+1)+2 b^2 e n^2 x \log (e x+1)}{e} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2*Log[1 + e*x],x]

[Out]

(-(a^2*e*x) + 4*a*b*e*n*x - 6*b^2*e*n^2*x - 2*a*b*e*x*Log[c*x^n] + 4*b^2*e*n*x*Log[c*x^n] - b^2*e*x*Log[c*x^n]
^2 + a^2*Log[1 + e*x] - 2*a*b*n*Log[1 + e*x] + 2*b^2*n^2*Log[1 + e*x] + a^2*e*x*Log[1 + e*x] - 2*a*b*e*n*x*Log
[1 + e*x] + 2*b^2*e*n^2*x*Log[1 + e*x] + 2*a*b*Log[c*x^n]*Log[1 + e*x] - 2*b^2*n*Log[c*x^n]*Log[1 + e*x] + 2*a
*b*e*x*Log[c*x^n]*Log[1 + e*x] - 2*b^2*e*n*x*Log[c*x^n]*Log[1 + e*x] + b^2*Log[c*x^n]^2*Log[1 + e*x] + b^2*e*x
*Log[c*x^n]^2*Log[1 + e*x] + 2*b*n*(a - b*n + b*Log[c*x^n])*PolyLog[2, -(e*x)] - 2*b^2*n^2*PolyLog[3, -(e*x)])
/e

________________________________________________________________________________________

Maple [F]  time = 0.199, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{2}\ln \left ( ex+1 \right ) \, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*ln(e*x+1),x)

[Out]

int((a+b*ln(c*x^n))^2*ln(e*x+1),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{{\left (b^{2} e x -{\left (b^{2} e x + b^{2}\right )} \log \left (e x + 1\right )\right )} \log \left (x^{n}\right )^{2}}{e} + \frac{-2 \, b^{2} e n^{2} x + 2 \, b^{2} e n x \log \left (x^{n}\right ) -{\left (e x -{\left (e x + 1\right )} \log \left (e x + 1\right ) + 1\right )} b^{2} \log \left (c\right )^{2} - 2 \,{\left (e x -{\left (e x + 1\right )} \log \left (e x + 1\right ) + 1\right )} a b \log \left (c\right ) -{\left (e x -{\left (e x + 1\right )} \log \left (e x + 1\right ) + 1\right )} a^{2} + \int -\frac{2 \,{\left (b^{2} n +{\left ({\left (e n - e \log \left (c\right )\right )} b^{2} - a b e\right )} x\right )} \log \left (e x + 1\right ) \log \left (x^{n}\right )}{x}\,{d x}}{e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(e*x+1),x, algorithm="maxima")

[Out]

-(b^2*e*x - (b^2*e*x + b^2)*log(e*x + 1))*log(x^n)^2/e + integrate(((b^2*e*log(c)^2 + 2*a*b*e*log(c) + a^2*e)*
x*log(e*x + 1) + 2*(b^2*e*n*x - (b^2*n + ((e*n - e*log(c))*b^2 - a*b*e)*x)*log(e*x + 1))*log(x^n))/x, x)/e

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} \log \left (c x^{n}\right )^{2} \log \left (e x + 1\right ) + 2 \, a b \log \left (c x^{n}\right ) \log \left (e x + 1\right ) + a^{2} \log \left (e x + 1\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(e*x+1),x, algorithm="fricas")

[Out]

integral(b^2*log(c*x^n)^2*log(e*x + 1) + 2*a*b*log(c*x^n)*log(e*x + 1) + a^2*log(e*x + 1), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*ln(e*x+1),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left (e x + 1\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(e*x+1),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*log(e*x + 1), x)